package com.vlin.config.redis.session;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;

@Configuration
public class JedisConfig {
	
	@Autowired
	private StandaloneProperties standaloneProperties;

	
	/*
	 * public JedisPoolConfig jedisPoolConfig() {
	 * 
	 * JedisPoolConfig config = new JedisPoolConfig(); config.setMaxTotal(100);
	 * config.setMaxIdle(10);
	 * 
	 * return config; }
	 */
	

	@Bean
	public LettuceConnectionFactory lettuceConnectionFactory() {
		LettuceConnectionFactory factory = new LettuceConnectionFactory(standaloneProperties);
		return factory;
	}

}
